package com.youlai.boot.modules.tp.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 品类销售响应VO
 * 
 * @author xiheforever
 * @since 2025-06-04
 */
@Schema(description = "品类销售响应数据")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CategorySalesResponseVO {

    @Schema(description = "品类数据")
    private List<CategorySalesDataVO> data;

    @Schema(description = "总计信息")
    private SummaryVO summary;

    @Schema(description = "品类销售数据")
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class CategorySalesDataVO {

        @Schema(description = "品类名称")
        private String name;

        @Schema(description = "销售占比(%)")
        private BigDecimal percentage;

        @Schema(description = "销售金额")
        private BigDecimal amount;

        @Schema(description = "颜色")
        private String color;
    }

    @Schema(description = "品类销售汇总信息")
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SummaryVO {

        @Schema(description = "总销售金额")
        private BigDecimal totalAmount;

        @Schema(description = "品类数量")
        private Integer categoryCount;

        @Schema(description = "销量最高的品类")
        private String topCategory;
    }
} 